<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script>
				
				
				window.onload = function()
				{
					console.log("页面加载完成了")
					
					// 通过document可以访问网页内容
					console.log(document.title)
					// document.title = "O(∩_∩)O哈哈~"
					
					var i = 0;
					// setInerval(定时要执行的代码,时间的间隔)
					setInterval(function()
					{
						if(i==0)
						{
							document.title = "O(∩_∩)O哈哈~"
							i=1
						}
						else 
						{
							document.title = "O(∩_∩)O嘿嘿~"
							i=0
						}
					},1000)
				}
				
				
			</script>
	</body>
</html>